﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace IMIS_ERP.Web.ERP_Shop
{
    public partial class ES_Page_Main : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                Bind_Info();
                Bind_rpt1();
                Bind_rpt2();
            }
        }

        private void Bind_Info()
        {
            IMIS_ERP.BLL.Shop_Info bll = new BLL.Shop_Info();
            IMIS_ERP.Model.Shop_Info model = new Model.Shop_Info();
            model = bll.GetModel(Session["siID"].ToString());
            lblsiID.Text = Session["siID"].ToString();
            lblsiFee.Text = model.siFee.ToString();
            lblsiCredit.Text = model.siCredit.ToString();
            //lblBalance.Text =Convert.ToString(model.siCredit*Convert.ToDecimal(0.70) + model.siFee);
            lblsiFeeCredit.Text = model.siFeeCredit.ToString();
            lblBalance.Text = Convert.ToString(model.siFeeCredit + model.siFee);
        }

        private void Bind_rpt1()
        {
            IMIS_ERP.BLL.System_Board bll = new BLL.System_Board();
            rpt1.DataSource = bll.GetNotice(0);
            rpt1.DataBind();
        }

        private void Bind_rpt2()
        {
            IMIS_ERP.BLL.System_Board bll = new BLL.System_Board();
            rpt2.DataSource = bll.GetNotice(1);
            rpt2.DataBind();
        }
    }
}